<template>
	<div class="listContainer">
		<div @click='toDetail(item.id)' class="listItem" v-for='(item,index) in shopList' :key="item.id">
			<image class="listItemImg" :src="item.listPicUrl" mode=""></image>
			<p class="listItemDesc">{{item.name}}</p>
			<p style='color: red;font-weight: bold;'>$ {{item.retailPrice}}</p>
		</div>
	</div>
</template>

<script>
	export default{
		props:['shopList'],
		data(){
			return{
				
			}
		},
		methods:{
			toDetail(goodId){
				uni.navigateTo({
					url:'/pages/detail/detail?goodId='+goodId
				})
			}
		}
	}
</script>

<style lang="stylus">
	.listContainer
		display flex
		flex-flow wrap
		justify-content space-between
		padding 0 20upx
		.listItem
			width 46%
			font-size 28upx
			margin-bottom 20upx
			.listItemImg
				width 100%
				height 360upx
			.listItemDesc
				margin-bottom 10upx
			
</style>
